package com.wantup.ext_proxy;

import java.lang.reflect.Method;

public class MyExtInvocationHandler implements MyExtJdkInvocationHandler {

    private Object target;

    public MyExtInvocationHandler(Object target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("自己实现的动态代理 开始。。。");

        Object invoke = method.invoke(target, args);
        System.out.println("自己实现的动态代理 结束。。。");

        return invoke;
    }
}
